home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / rexx / 215 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: news-m01.ny.us.ibm.net!usenet
  2. From: rodenas@ibm.net (Fernando Rodenas)
  3. Newsgroups: comp.lang.rexx,bit.listserv.tsorexx,bit.listserv.ibm-main
  4. Subject: Re: Formatting in REXX
  5. Date: Thu, 11 Jan 1996 22:24:20 GMT
  6. Distribution: inet
  7. Message-ID: <4d412g$2oh4@news-s01.ny.us.ibm.net>
  8. References: <4d205n$qk0@preeda.internex.net.au>
  9. Reply-To: rodenas@ibm.net
  10. NNTP-Posting-Host: slip139-92-17-228.emea.ibm.net
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. srinivas@connexus.apana.org.au (Srinivas Kopparapu) wrote:
  14.  
  15. You can use LEFT and RIGHT instructions:
  16.  
  17. LEFT(var_name,positions,padding_char)
  18. RIGHT "
  19.  
  20. So:
  21.  
  22. LEFT('abc',6) -> 'abc   '
  23. LEFT('abc',6,'-') -> 'abc---'
  24. RIGHT('abc',6) -> '   abc'
  25. RIGHT('abc',6,'-') -> '---abc'
  26.  
  27.  
  28. >Organization: connexus.apana.org.au
  29. >Summary: 
  30. >Keywords: 
  31.  
  32. >Hello everyone, 
  33. >I am using MVS/REXX (IBM) and want to know whether there is
  34. >an easy way for formatting texts/numbers. I read sequential
  35. >datasets/files and want to produce reports with columns and headers
  36. >aligned properly. Basically I want to specify how many characters
  37. >a particular variable should be taking in the report appropriately
  38. >padded with blanks.
  39.  
  40. >At present  I am doing this using LENGTH and COPIES functions. But
  41. >the expression becomes cumbersome if many variables needs to be
  42. >in the same line.
  43.  
  44. >I would appreciate any ideas/tips or pointers in the right direction.
  45.  
  46. >TIA
  47. >Sri
  48.  
  49.  
  50. ==================================================
  51.  Fernando Rodenas                 rodenas@ibm.net
  52.  Barcelona             100023.2463@compuserve.com
  53.  Spain                    ISOC member - OS/2 Team
  54.  http://ourworld.compuserve.com/homepages/rodenas
  55. ==================================================
  56.  
  57.